﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:resize="clr-namespace:VMukti.CtlResizer.Presentation;assembly=VMukti.CtlResizer.Presentation"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"
	xmlns:s="clr-namespace:ReissSoftware"
    xmlns:local="clr-namespace:VMukti.Presentation.MainPod"
    x:Class="VMukti.Presentation.MainPod.CtlPod"
    AllowDrop="True" OpacityMask="{DynamicResource PodOpacity}"
    Name="ucPod" Background="{x:Null}" Height="394" Width="552"
    BorderThickness="0,0,0,0"
    ClipToBounds="True" SnapsToDevicePixels="True"
    HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
    BorderBrush="{x:Null}"
    >

    <UserControl.Resources>
        <local:CcnvPodBodyHeight x:Key="oIntToString"/>
        <Storyboard x:Key="OnOpenClick">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="cnvTitle" Storyboard.TargetProperty="(FrameworkElement.Width)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="552"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Key="OnCloseClick">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="cnvTitle" Storyboard.TargetProperty="(FrameworkElement.Width)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="552"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="0"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
    </UserControl.Resources>

    <Canvas Name="cnvMainPOD" Background="{DynamicResource PodBackground}" Width="{Binding Path=Width, ElementName=ucPod}" Height="{Binding Path=Height, ElementName=ucPod, Mode=Default}" >
        <Grid VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Name="grdMain" Height="{Binding Path=Height, ElementName=cnvMainPOD, Mode=Default}" Width="{Binding Path=Width, ElementName=cnvMainPOD}" Background="{DynamicResource PodBackground}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Name="colDef1" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Name="rowDef1" Height="25"/>
                <RowDefinition Name="rowDef2" Height="*"/>
            </Grid.RowDefinitions>
            <Grid x:Name="cnvTitle" Height="25" HorizontalAlignment="Stretch" Grid.Column="0" Grid.Row="0" Width="{Binding Path=Width, ElementName=cnvMainPOD}"  Background="{DynamicResource Title2}"  Grid.ColumnSpan="1" Grid.RowSpan="1"  >

                <Label Foreground ="#FF000000" Name="lblTitle" Width="{Binding Path=Width, ElementName=cnvTitle}" Height="23" Background="{x:Null}" Margin="25,0,0,0" FontSize="12" FontWeight="SemiBold" HorizontalAlignment="Stretch" />

                <!--<Button Style="{DynamicResource SmallButton}" Name="btnMinimized" ToolTip="Minimize" AllowDrop="False"  BorderThickness="1,1,1,1" Cursor="Arrow" 
                Background="{DynamicResource Background}" Foreground="#FFFFFFFF" FontWeight="Bold" FontSize="13" BorderBrush="#FF000000" Focusable="False"  Margin="0,5,8,5"
                HorizontalAlignment="Right" Width="14">
                    <Rectangle Fill="{DynamicResource MinBrush}" Margin="0,5,0,0" Height="3" Width="9" />
                </Button>-->

				<ComboBox Name="cmbPodBuddy" ToolTip="BuddyList" AllowDrop="False"  BorderThickness="1,1,1,1" Cursor="Arrow" 
                Background="{DynamicResource Background}" Foreground="#FF000000" FontWeight="Bold" FontSize="13" BorderBrush="#FF000000" Focusable="False"  Margin="0,5,47,5"
                HorizontalAlignment="Right" Width="19" Text="B" VerticalContentAlignment="Top" VerticalAlignment="Top" MouseLeave="cmbPodBuddy_MouseLeave" MouseEnter="cmbPodBuddy_MouseEnter">
				</ComboBox>

				<Button Name="btnMinimized" ToolTip="Close" AllowDrop="False" Cursor="Arrow" 
                Background="{DynamicResource Background}" Foreground="#FF000000" FontWeight="Bold" FontSize="13" BorderBrush="#FF000000" Focusable="False"  Margin="0,5,8,5"
                HorizontalAlignment="Right" Height="15" Width="14" VerticalContentAlignment="Top" VerticalAlignment="Top">
					<Path x:Name="Path" Stretch="Fill" StrokeThickness="0.5" Stroke="#FF333333" Fill="#FF969696" Data="F1 M 2.28484e-007,1.33331L 1.33333,0L 4.00001,2.66669L 6.66667,6.10352e-005L 8,1.33331L 5.33334,4L 8,6.66669L 6.66667,8L 4,5.33331L 1.33333,8L 1.086e-007,6.66669L 2.66667,4L 2.28484e-007,1.33331 Z " HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
				</Button>


				<Button Name="btnMaximized" ToolTip="Maximize" AllowDrop="False" BorderThickness="1,1,1,1" Cursor="Arrow" Background="{DynamicResource Background}" Foreground="White" FontWeight="Bold" FontSize="13" BorderBrush="#FF000000" Style="{DynamicResource SmallButton}" Focusable="False" Margin="0,5,27,5" HorizontalAlignment="Right" Width="14">
                    <Rectangle Fill="{DynamicResource MaxBrush}" Margin="0,0,0,0" Height="9" Width="9" />
                </Button>

            </Grid>
            <Canvas Name="cnvPodBody" Background="{DynamicResource PodSQBG}" ClipToBounds="True" Margin="0,24,0,0" Width="{Binding Width, ElementName=cnvMainPOD}" Height="{Binding ElementName=cnvMainPOD, Path=Height, Converter={StaticResource oIntToString}}" d:IsHidden="True" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" ScrollViewer.CanContentScroll="True">
                <ScrollViewer Focusable="False" Width="Auto" Height="Auto" Grid.IsSharedSizeScope="True" CanContentScroll="True" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
                    <Rectangle x:Name="rctPodBody" Height="Auto" Width="Auto" StrokeThickness="1" RadiusX="10" RadiusY="10" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
                </ScrollViewer>
            </Canvas>
        </Grid>
        <!--<Button x:Name="btnHidePanel" Width="15" Content="" Click="btnHidePanel_Click" Style="{DynamicResource ArrowButtons}" RenderTransformOrigin="0.5,0.5" Foreground="{x:Null}"  Focusable="False" Height="15" Canvas.Left="4" Canvas.Top="4" >
            <Button.RenderTransform>
                <TransformGroup>
                    <ScaleTransform ScaleX="-1" ScaleY="1"/>
                    <SkewTransform AngleX="0" AngleY="0"/>
                    <RotateTransform Angle="180"/>
                    <TranslateTransform X="0" Y="0"/>
                </TransformGroup>
            </Button.RenderTransform>
        </Button>-->
        <StackPanel x:Name="lbPodBody" Width="Auto" Height="Auto" Canvas.Left="-75" Canvas.Top="-150" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
            <s:ImageAnim Source="Controls\Pod\Images\loading.gif" />
        </StackPanel>
    </Canvas>
</UserControl>